﻿using System;
using Kiva7.Utilities;
using Kiva7.DataResponse;
using Kiva7.DataClasses;

namespace Kiva7.DataRequests
{
    public class LenderTeamsRequest : DataRequest<TeamsResponse, Team>
    {
        public LenderTeamsRequest()
            : base(true, true)
        {
        }
        public Uri BuildUri(string lenderId)
        {
            UrlCreator url = new UrlCreator(string.Format(BaseUrl + "lenders/{0}/teams.xml", lenderId));

            url.Add("app_id", KivaAppId);

            return url.ToUri();
        }

        public void GetTeams(string lenderId)
        {
            LoadResponse(BuildUri(lenderId));
        }

    }
}
